export const getTileMapJson = (name: string) => {
    return Laya.Loader.getRes(`res/tiles/${name}.json`)
}
export const getBehaviorJson = (name: string) => {
    return Laya.Loader.getRes(`res/ai/${name}.json`)
}

export const distance2 = (centerX, centerY, targetX, targetY) => {
    let dx: number = centerX - targetX;
    let dy: number = centerY - targetY;
    let distance: number = dx * dx + dy * dy;
    return distance;
};